﻿using System;
using System.Windows.Forms;
using ComponentLoader;
using ebcpatterns.infrastructure;

namespace WinFormsHost
{
    internal static class Program
    {
        [STAThread]
        private static void Main(string[] args) {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            var loader = new StructureMapComponentLoader<IEntryPoint>();
            var withTracing = args.Length == 0
                ? true
                : string.Compare(args[0], "/donttrace", StringComparison.CurrentCultureIgnoreCase) != 0;
            loader.Load(withTracing);

            loader.InstanciateEntryPoint().Run(args);
        }
    }
}